<!--交通物流-->
<template>
  <div class="mainContainer">
      <floatLeft v-if="showPark && showPane && !isRoam"></floatLeft>
      <floatRight v-if="showPark  && showPane && !isRoam"></floatRight>
  </div>
</template>

<script>

import floatLeft from "@/views/traffic/floatLeft";
import floatRight from "@/views/traffic/floatRight";
import {mapGetters} from "vuex";

export default {
  name: "index",
  components: {
    floatLeft, floatRight,
  },
  data() {
    return {
      showPark: true,//显示园区总览
    }
  },
  mounted() {

  },
  computed: {
    ...mapGetters({
      showPane: 'setting/getPane',
      isRoam: 'setting/getRoam',
      parkValue: 'setting/getPark',
    }),
  },
  watch: {
    parkValue(nV) {
      this.selectChange(nV)
    }
  },
  beforeDestroy() {
  },
  methods: {
  }
  ,
}
</script>

<style lang="scss">

.parkSelectContainer {
  position: relative;
  position: absolute;
  left: 627px;
  top: 92px;

  .el-input {
    width: 216px;
    background-size: 100% 100%;
    background-image: url("@/assets/bg_parkselect.png");
    border-radius: 0px;
    border: 0px solid #19966F;
    align-items: center;
  }

  .el-input__inner {
    height: 30px;
    user-select: none !important;
    line-height: 30px;
    font-size: 17px;
    font-family: Source Han Sans SC;
    font-weight: bold;
    color: #FFFFFF;
    background: linear-gradient(0deg, #23A5F7 0.146484375%, #CAF6FF 100%);
    border: 0px;
    text-align: center;
    background: transparent;
  }

  .el-select__caret:before {
    content: "";
    position: absolute;
    top: -5px;
    right: 0px;
    transform: translate(-5px, 0px);
    color: #62BDEF;
  }

  .el-select-dropdown {
    background-color: transparent;
    background-size: 100% 100%;
    background-image: url("@/assets/bg_parkselect_o.png");
    border: 0px solid transparent;
  }

  // 设置下拉框的字体属性及背景颜色；
  .el-select-dropdown__item {
    text-align: center;
    height: 23px;
    margin-left: 6px;
    margin-right: 6px;
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 22px;
    font-size: 10px;
    font-family: Source Han Sans SC;
    color: #FFFFFF;
    background-color: transparent;
  }

  .el-select-dropdown__item.selected {
    color: #03E4FF;
  }

  .el-select-dropdown__item:hover {
    background: transparent !important;
    color: #03E4FF;
  }

  // 设置下拉框列表的 padding 值为：0；(即：样式调整)
  .el-select-dropdown__list {
    padding: 0;
  }

  // 设置输入框与下拉框的距离为：0; (即：样式调整)
  .el-popper[x-placement^="bottom"] {
    margin-top: 10px;
    padding-top: 10px;
  }

  // 将下拉框上的小箭头取消；(看着像一个箭头，其实是两个重叠在一起的箭头)
  .el-popper .popper__arrow,
  .el-popper .popper__arrow::after {
    display: none;
  }

  // 设置鼠标悬停在下拉框列表的悬停色；
  .el-select-dropdown__item:hover {
    background-color: #cccccc;
  }
}
@media screen and (min-width: 1000px) and (max-width: 3000px) {
  $width_2k: 1920;
  $height_2k: 1080;
  $width: 4000;
  $height: 1486;
  $unit: px;
  @function calWidth_2k($pixel) {
    @return $width_2k*$pixel/$width;
  }
  @function calHeight_2k($pixel) {
    @return $pixel/1.8*2.7;
  }
  @function calFont_2k($pixel) {
    @return $height_2k*$pixel/$height;
  }
  .parkSelectContainer {
    top: calHeight_2k(92px);

    .el-input {
    }

    .el-input__inner {
      height: calHeight_2k(30px);
      line-height: calHeight_2k(30px);
    }

    .el-select__caret:before {
      top: calHeight_2k(-5px);
    }

    .el-select-dropdown {
    }

    // 设置下拉框的字体属性及背景颜色；
    .el-select-dropdown__item {
      height: calHeight_2k(23px);
      margin-bottom: calHeight_2k(10px);
      line-height: calHeight_2k(22px);
    }

    .el-select-dropdown__item.selected {
    }

    .el-select-dropdown__item:hover {
    }

    // 设置下拉框列表的 padding 值为：0；(即：样式调整)
    .el-select-dropdown__list {
    }

    // 设置输入框与下拉框的距离为：0; (即：样式调整)
    .el-popper[x-placement^="bottom"] {
      margin-top: calHeight_2k(10px);
      padding-top: calHeight_2k(10px);
    }

    // 将下拉框上的小箭头取消；(看着像一个箭头，其实是两个重叠在一起的箭头)
    .el-popper .popper__arrow,
    .el-popper .popper__arrow::after {
    }

    // 设置鼠标悬停在下拉框列表的悬停色；
    .el-select-dropdown__item:hover {
    }
  }
}
</style>
<style lang="scss" scoped>

.mainContainer {
  overflow-x: hidden;
  overflow-y: hidden;

  .titleContainer {
    width: 100%;
    height: 82px;
    background-size: 100% 100%;
    background-image: url("@/assets/icon_title.png");
  }

  .mapContainer {
    display: flex;
    flex-direction: row;
    position: absolute;
    right: 650px;
    top: 92px;

    .map {
      cursor: pointer;
      margin-left: 5px;
      width: 65px;
      text-align: center;
      height: 24px;
      background-size: 100% 100%;
      font-size: 11px;
      font-family: Source Han Sans SC;
      font-weight: 400;
      line-height: 24px;

      &_normal {
        background-image: url("@/assets/icon_map2.png");
        color: #ffffff;
      }

      &_select {
        background-image: url("@/assets/icon_map1.png");
        color: #01A2FF;
      }
    }

  }
}
@media screen and (min-width: 1000px) and (max-width: 3000px) {
  $width_2k: 1920;
  $height_2k: 1080;
  $width: 4000;
  $height: 1486;
  $unit: px;
  @function calWidth_2k($pixel) {
    @return $width_2k*$pixel/$width;
  }
  @function calHeight_2k($pixel) {
    @return $pixel/1.8*2.7;
  }
  @function calFont_2k($pixel) {
    @return $height_2k*$pixel/$height;
  }
  mainContainer {

    .titleContainer {
      height:calHeight_2k( 82px);
    }

    .mapContainer {
      top: calHeight_2k(92px);

      .map {
        height: calHeight_2k(24px);
        background-size: 100% 100%;
        font-size: 11px;
        font-family: Source Han Sans SC;
        font-weight: 400;
        line-height: 24px;

        &_normal {
          background-image: url("@/assets/icon_map2.png");
          color: #ffffff;
        }

        &_select {
          background-image: url("@/assets/icon_map1.png");
          color: #01A2FF;
        }
      }

    }
  }
}
</style>
